package com.mjlf.mqserver.inter;

import com.mjlf.mqserver.entity.Message;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @ClassName MessageFactory
 * @Author mjlft
 * @Date 2020/2/19 12:37
 * @Version 1.0
 * @Description TODO
 */
public interface MessageFactory {
    Map<String, List<Message>> message = new ConcurrentHashMap<>(16);
    Map<String, Integer> customerIndex = new ConcurrentHashMap<>();
    Map<String, List<Message>> copyMessage = new ConcurrentHashMap<>(16);
    List<String> servers = new ArrayList<>();

    void insertMessage(String topicName, String message) throws Exception;
    String getMessage(String topicName, String groupName) throws Exception;
    void synMessage() throws Exception;
    void synCustomerIndex() throws Exception;
}
